home *** CD-ROM | disk | FTP | other *** search
- /* Listing 2 -- File HEXIO.H */
- /* Header File for Intel Hex / S-Record File I/O Routines */
-
- #include <stdio.h>
-
- #define HEOF (-1) /* This is our value for EOF. */
-
- #define HEXRECSIZE 32 /* Max. number of data bytes per */
- /* record on writes. */
-
- typedef struct { /* This is the control block that */
- FILE *file; /* actually runs hex file I/O. */
- unsigned char *bufp;
- unsigned loadaddr;
- unsigned char flags;
- unsigned char count;
- unsigned char buf[256];
- } HFILE;
-
- /* Function declarations: */
-
- int hclose(HFILE *);
- int heof(HFILE *);
- int herror(HFILE *);
- int hgetc(HFILE *);
- int hputc(unsigned char,HFILE *);
- unsigned htell(HFILE *);
- void hseek(HFILE *,unsigned);
- HFILE *hopen(char *,char *);
-